package com.itnoob.whitelist.controller;

import com.itnoob.whitelist.annotation.WhiteList;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhoujun
 * @date 2025/3/20 23:44
 */
@RestController
public class HelloController {

    /**
     * 请求localhost:8080/hello   header中填参数userOrIp = xxxx  body中参数name=xxx2
     * @param name
     * @return
     */
    @WhiteList({"user3","user4"})
    @GetMapping("/hello")
    public String hello(@RequestParam("name") String name){
        return "Hello " + name + "!";

    }
}
